import * as service from "@/service"

// 查询指标选项
export function selectTarget() {
    return service.fetch.get({
        url: `/intelligentsearch/metric/frontendMetriclist`,
    })
}

// 查询区域选项
export function selectAreaOption(params) {
    return service.fetch.get({
        url: `intelligentsearch/metric/frontendAreaOptions`,
        params
    })
}

// 查询搜索历史
export function selectHistory() {
    return service.fetch.get({
        url: `intelligentsearch/metric/frontendSearchHistories`,
    })
}

// 查询分析选项
export function selectAnalysis(id) {
    return service.fetch.get({
        url: `intelligentsearch/metric/${id}`,
    })
}

// 查询图表
export function selectEchart(data) {
    return service.fetch.post({
        url: `intelligentsearch/metric/metricChart`,
        data
    })
}

// 查询表格
export function selectTable(data) {
    return service.fetch.post({
        url: `intelligentsearch/metric/metricResult`,
        data
    })
}